package com.servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bean.Person;

import dong.print.Prints;
import dong.web.servlet.URL;

public class TestServlet {

	@URL(name = "index.action", to = "index.jsp")
	public void execute(HttpServletRequest req, HttpServletResponse res) {
		req.setAttribute("name", "hello dong!");
	}

	@URL(name = "indexa.action", to = "indexa.jsp")
	public void index(HttpServletRequest req, String name, int age, Person p) {
		System.out.println(this.hashCode());
		System.out.println("name:" + name + ", age:" + age);
		new Prints().print(p);
		req.setAttribute("name", name);
	}

}
